<template>
  <div class="topBackGround">
    <div class="intop">
      <FrontNav :nuser="user"></FrontNav>
    </div>
    <div class="topbody">
      <router-view @flush="flush"></router-view>
    </div>

  </div>
  <FrontFoot></FrontFoot>
</template>

<script>
import FrontNav from "@/components/FrontNav.vue";
import FrontFoot from "@/components/front/FrontFoot.vue";

export default {
  name: "FrontIndex",
  components: {
    FrontNav,
    FrontFoot
  },
  data() {
    return {
      user: null,
    }

  },
  watch: {
    user() {
      console.log(this.user)
    }
  },
  methods: {
    flush(e) {
      this.user = e
    }
  }
}
</script>

<style scoped>
.intop {
  font-size: 18px;
  padding: 10px;
  background: #ffff;
  z-index: 100;
  position: sticky;
  top: 0;
}

.topBackGround {
  background: #f5f5f5;
}

.topbody {
  background: #ffff;
  width: 1200px;
  min-height: 660px;
  margin: 0 auto;
}
</style>